//
//  AXMyOtherManageCell.m
//  AnXin100
//
//  Created by 天质弘耕 on 2018/11/12.
//  Copyright © 2018 tzhg. All rights reserved.
//

#import "AXMyOtherManageCell.h"

@implementation AXMyOtherManageCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self creatView];
        [self setlayout];
    }
    return self;
}

- (void)creatView {
    
    self.label1 = [[UILabel alloc]init];
    self.label1.text = @"农事操作时间：2018.12.12";
    self.label1.font = FONT_FOURTEEN;
    self.label1.textColor = COLOR_Gray;
    [self.contentView addSubview:self.label1];
    
    self.label2 = [[UILabel alloc]init];
    self.label2.text = @"操作事项:除草";
    self.label2.font = FONT_FOURTEEN;
    self.label2.textColor = COLOR_Gray;
    [self.contentView addSubview:self.label2];
    
    /** 选择图片 */
    self.btn = [[UIButton alloc]init];
    [self.btn setImage:[UIImage imageNamed:@"zwselect"] forState:UIControlStateNormal];
    [self.contentView addSubview:self.btn];
    
    self.label3 = [[UILabel alloc]init];
    self.label3.text = @"天气：晴";
    self.label3.font = FONT_FOURTEEN;
    self.label3.textColor = COLOR_Gray;
    [self.contentView addSubview:self.label3];
    
    self.label4 = [[UILabel alloc]init];
    self.label4.text = @"气温：23℃";
    self.label4.font = FONT_FOURTEEN;
    self.label4.textColor = COLOR_Gray;
    [self.contentView addSubview:self.label4];
    
    
}

- (void)setlayout {
    
    self.label1.sd_layout
    .leftSpaceToView(self.contentView, 10)
    .topSpaceToView(self.contentView, 0)
    .widthIs(SCREEN_WIDTH-60)
    .heightIs(30);
    
    self.btn.sd_layout
    .rightSpaceToView(self.contentView, 10)
    .topSpaceToView(self.contentView, 0)
    .widthIs(30)
    .heightIs(30);
    
    self.label2.sd_layout
    .leftSpaceToView(self.contentView, 10)
    .topSpaceToView(self.label1, 0)
    .widthIs(SCREEN_WIDTH-20)
    .heightIs(30);
    
    
    self.label3.sd_layout
    .leftSpaceToView(self.contentView, 10)
    .topSpaceToView(self.label2, 0)
    .widthIs(60)
    .heightIs(30);
    
    self.label4.sd_layout
    .leftSpaceToView(self.label3, 10)
    .topSpaceToView(self.label2, 0)
    .widthIs(SCREEN_WIDTH-90)
    .heightIs(30);
    
    
    
    [self setupAutoHeightWithBottomView:self.label3 bottomMargin:10];
    
    
}

@end
